<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../ext/resources/css/ext-all.css"
	type="text/css"></link>
<script type="text/javascript" src="../ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext/ext-all.js"></script>
<script type="text/javascript">
	Ext.onReady(function() {
		Ext.QuickTips.init();

	});
	function applyForm() {
		if (document.getElementById("selectPosition").value == 0) {
			Ext.Msg.alert("系统消息", "对不起,由于暂时没有考试单位承办当前考试,暂时不能报告该考项！请您耐心等待！");
		} else {
		Ext.Ajax.request({
			url : 'validateConductionPersonCount.action',
			params : {
				exam_Id:document.getElementById("exam_Id").value,
				conduction_Id : document.getElementById("selectPosition").value,
				startTime : document.getElementById("exam_StartTime").value,
				endTime : document.getElementById("exam_EndTime").value
			},
			success : function(response) {
				var obj = Ext.decode(response.responseText);
				if (obj.success == false) {
					Ext.Msg.alert("系统消息", obj.msg);
					return false;
				} else {
					 Ext.Ajax.request({
					url : 'applyForm.action',
					form : 'myform',
					success : function(response) {
						var obj = Ext.decode(response.responseText);
						if (obj.success == false) {
							Ext.Msg.alert("系统消息", obj.msg);
							return false;
						} else {
							Ext.Msg.alert("系统消息", obj.msg, function() {
								document.location.href = "UserIndex";
							});
						}
					}
				});
				}
			}
		}); 
		}
	}
</script>
</head>
<body>
	<div class="right1">
		<p align="center">
			<font color="red" size="3px">关于考试项目"${exam.examInfo_Name}"考生信息申请表单</font>
		</p>
		<div class="title5"></div>
		<div class="bar6" align="left"
			style="font-size: 14px; margin-left: 3cm; width: 100%">
			<s:form method="post" enctype="multipart/form-data" id="myform">
				<table>
					&nbsp;&nbsp;&nbsp;
					<tr>
						<td>考生姓名:</td>
						<td>${UserLogin.user_RealName}</td>
					</tr>
					<tr>
						<td>性别:</td>
						<td>${UserLogin.user_Sex}</td>
					</tr>
					<tr>
						<td>年龄:</td>
						<td>${UserLogin.examineeValue_Age}</td>
					</tr>
					<tr>
						<td>邮箱:</td>
						<td>${UserLogin.examineeValue_Email}</td>
					</tr>
					<tr>
						<td>身份证号:</td>
						<td>${UserLogin.examineeValue_IdentityCard}</td>
					</tr>
					<tr>
						<td>考生相片:</td>
						<td><img alt="考生相片" src="UserPhoto.action" width="100px"
							height="80px" /></td>
					</tr>
					<tr>
						<td>希望报考考场:</td>
						<td><s:select name="conduction_Id" list="conductions"
								listKey="conduction_Id" listValue="conduction_Name"
								required="true" id="selectPosition" /></td>
						<td><p ext:hide="user" ext:qclass="" ext:qwidth="300"
								ext:qtitle="注意："
								ext:qtip="<b><i>选项列表中第一选项是系统根据考试注册时位置自动计算的最近考场地址，请考生加以注意！</i></b>">
								<font color="#EA8D13">提示:请悬停!</font>
							</p></td>
					</tr>
					<input type="hidden" id="exam_Id" name="exam_Id" value="${exam.examInfo_Id}" />
					<input type="hidden" id="exam_StartTime" value="${exam.examInfo_StartTime}" />
					<input type="hidden" id="exam_EndTime" value="${exam.examInfo_EndTime}" />
					<s:token></s:token>
					<tr>
						<td><input type="button" value="    确      认    "
							onclick="applyForm()" /></td>
						<td><input type="button" value="    返       回    "
							onclick="history.back()" /></td>
					</tr>
				</table>
			</s:form>
		</div>
	</div>
</body>
</html>